package com.acme.task3;

public class Task3Arrays {
     
     private static int n = 50;
     private int [] arr ;

          
     public static void main(String[] args) {
          
           for (int i = 1; i <= 50; i++) {
               if (i % 3 == 0) {
                   System. out.println("Number " + i + " divisible by 3" );
              }
          }
          
          Task3Arrays testArr = new Task3Arrays(n);
          System. out.println("Average" + testArr.avg());    
          
     }    
     
     public Task3Arrays( int n) {
           arr = new int [n];

           for (int i = 0; i < n; i++) {
               arr[i] = i+1;
          }
     }
          
     public double avg () {
           double sum = 0;
           for (int i = 0; i < n; i++) {
              sum += arr[i];
          }
           return sum/n ;
     }
}
